package com.ruoyi.project.ledger.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.ledger.mapper.LedgerVehicleFactoryRegistrationMapper;
import com.ruoyi.project.ledger.domain.LedgerVehicleFactoryRegistration;
import com.ruoyi.project.ledger.service.ILedgerVehicleFactoryRegistrationService;

/**
 * 治超管理台账Service业务层处理
 * 
 * @author gwc
 * @date 2020-04-15
 */
@Service
public class LedgerVehicleFactoryRegistrationServiceImpl implements ILedgerVehicleFactoryRegistrationService 
{
    @Autowired
    private LedgerVehicleFactoryRegistrationMapper ledgerVehicleFactoryRegistrationMapper;

    /**
     * 查询治超管理台账
     * 
     * @param id 治超管理台账ID
     * @return 治超管理台账
     */
    @Override
    public LedgerVehicleFactoryRegistration selectLedgerVehicleFactoryRegistrationById(Long id)
    {
        return ledgerVehicleFactoryRegistrationMapper.selectLedgerVehicleFactoryRegistrationById(id);
    }

    /**
     * 查询治超管理台账列表
     * 
     * @param ledgerVehicleFactoryRegistration 治超管理台账
     * @return 治超管理台账
     */
    @Override
    public List<LedgerVehicleFactoryRegistration> selectLedgerVehicleFactoryRegistrationList(LedgerVehicleFactoryRegistration ledgerVehicleFactoryRegistration)
    {
        return ledgerVehicleFactoryRegistrationMapper.selectLedgerVehicleFactoryRegistrationList(ledgerVehicleFactoryRegistration);
    }

    /**
     * 新增治超管理台账
     * 
     * @param ledgerVehicleFactoryRegistration 治超管理台账
     * @return 结果
     */
    @Override
    public int insertLedgerVehicleFactoryRegistration(LedgerVehicleFactoryRegistration ledgerVehicleFactoryRegistration)
    {
        ledgerVehicleFactoryRegistration.setCreateTime(DateUtils.getNowDate());
        return ledgerVehicleFactoryRegistrationMapper.insertLedgerVehicleFactoryRegistration(ledgerVehicleFactoryRegistration);
    }

    /**
     * 修改治超管理台账
     * 
     * @param ledgerVehicleFactoryRegistration 治超管理台账
     * @return 结果
     */
    @Override
    public int updateLedgerVehicleFactoryRegistration(LedgerVehicleFactoryRegistration ledgerVehicleFactoryRegistration)
    {
        ledgerVehicleFactoryRegistration.setUpdateTime(DateUtils.getNowDate());
        return ledgerVehicleFactoryRegistrationMapper.updateLedgerVehicleFactoryRegistration(ledgerVehicleFactoryRegistration);
    }

    /**
     * 批量删除治超管理台账
     * 
     * @param ids 需要删除的治超管理台账ID
     * @return 结果
     */
    @Override
    public int deleteLedgerVehicleFactoryRegistrationByIds(Long[] ids)
    {
        return ledgerVehicleFactoryRegistrationMapper.deleteLedgerVehicleFactoryRegistrationByIds(ids);
    }

    /**
     * 删除治超管理台账信息
     * 
     * @param id 治超管理台账ID
     * @return 结果
     */
    @Override
    public int deleteLedgerVehicleFactoryRegistrationById(Long id)
    {
        return ledgerVehicleFactoryRegistrationMapper.deleteLedgerVehicleFactoryRegistrationById(id);
    }
}
